import request from '@/utils/request'

// 查询场馆列表
export function listVenues(query) {
  return request({
    url: '/hj/venues/list',
    method: 'get',
    params: query
  })
}

// 查询场馆详细
export function getVenues(venueId) {
  return request({
    url: '/hj/venues/' + venueId,
    method: 'get'
  })
}

// 新增场馆
export function addVenues(data) {
  return request({
    url: '/hj/venues',
    method: 'post',
    data: data
  })
}

// 修改场馆
export function updateVenues(data) {
  return request({
    url: '/hj/venues',
    method: 'put',
    data: data
  })
}

// 删除场馆
export function delVenues(venueId) {
  return request({
    url: '/hj/venues/' + venueId,
    method: 'delete'
  })
}

// 查询所有可预约场馆信息
export function getVenuesBystatus() {
  return request({
    url: '/hj/venues/getVenuesBystatus' ,
    method: 'get'
  })
}

// 查询所有可预约场馆信息
export function getAllVenues() {
  return request({
    url: '/hj/venues/getAllVenues' ,
    method: 'get'
  })
}

// 查询每个场馆被排班的次数信息
export function countSchedule() {
  return request({
    url: '/hj/venues/countSchedule' ,
    method: 'get'
  })
}